Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
coffeelint
Advanced tools
CoffeeLint is a style checker that helps keep CoffeeScript code clean and consistent.
For guides on installing, using and configuring CoffeeLint, head over here.
To suggest a feature, report a bug, or general discussion, head over here.
Current:
Past:
New rules should be set to a warn
level. Developers will expect new changes to NOT break their existing workflow, so unless your change is extremely usefull, default to warn
. Expect discussion if you choose to use error
.
Look at existing rules and test structures when deciding how to name your rule. no_foo.coffee
is used for many tests designed to catch specific errors, whereas foo.coffee
is used for tests that are designed to enforce formatting and syntax.
npm install
to get dependencies.src/rules/your_rule_here.coffee
, using the existing
rules as a guide.
You may examine the AST and tokens using
http://asaayers.github.io/clfiddle/.my_test.coffee
to the test
directory.src/coffeelint.coffee
.npm run testrule test/your_test_here.coffee
.npm test
.When adding a new rule, its documentation is specified by setting a
description
property within its rule
property:
module.exports = class NoComment
rule:
name: 'no_comment'
level: 'ignore'
message: 'No comment'
description: '''
Disallows any comment in the code
'''
tokens: ['#', '###']
lintToken : (token, tokenApi) ->
return {context: "Found '#{token[0]}'"}
The description property is a string that can embed HTML code:
description: '''
Disallows any comment in the code. This code would not pass:
<pre>
<code>### Some code with comments
foo = ->
# some other comments
bar()
</code>
</pre>
'''
Coffeelint's website generates each
rule's documentation based on this description
property.
When adding a new rule, it is suggested that you check that the documentation for your new rule is generated correctly. In order to do that, you should follow these steps:
npm run compile
.gh-pages
branch: git checkout origin/gh-pages
.cp lib/coffeelint.js js/coffeelint.js
.rake updatehtml
. Note that you will
probably need to install rake.index.html
file with your favorite browser and make sure that your
rule's documentation is generated properly.FAQs
Lint your CoffeeScript
The npm package coffeelint receives a total of 14,310 weekly downloads. As such, coffeelint popularity was classified as popular.
We found that coffeelint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.